import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [{
            path: '/',
            redirect: '/myHomePage'
        },
        {
            path: '/',
            component: () => import( /* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: {
                title: '自述文件'
            },
            children: [{
                    path: '/myHomePage',
                    component: () => import( /* webpackChunkName: "dashboard" */ '../components/page/MyHomePage.vue'),
                    meta: {
                        title: '我的主页',
                        noCache: false,
                        affix: false
                    }
                },
                {
                    path: '/CreateTest',
                    component: () => import( /* webpackChunkName: "dashboard" */ '../components/page/CreateTest.vue'),
                    meta: {
                        title: '创建考试'
                    }
                },
                {
                    path: '/StartExam',
                    component: () => import( /* webpackChunkName: "dashboard" */ '../components/page/StartExam.vue'),
                    meta: {
                        title: '开始考试'
                    }
                },
                {
                    path: '/TopicManage',
                    component: () => import( /* webpackChunkName: "dashboard" */ '../components/page/TopicManage.vue'),
                    meta: {
                        title: '试卷管理'
                    }
                },
                {
                    path: '/person',
                    component: () => import( /* webpackChunkName: "dashboard" */ '../components/page/person.vue'),
                    meta: {
                        title: '个人信息'
                    }
                },
                {
                    path: '/mytraining',
                    component: () => import( /* webpackChunkName: "dashboard" */ '../components/page/MyTraining.vue'),
                    meta: {
                        title: '我的培训'
                    }
                },
                {
                    path: '/trainingDetails',
                    component: () => import( /* webpackChunkName: "dashboard" */ '../components/page/TrainingDetails.vue'),
                    meta: {
                        title: '培训详情'
                    }
                },
                {
                    path: '/icon',
                    component: () => import( /* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
                    meta: {
                        title: '自定义图标'
                    }
                },
                {
                    path: '/createCourse',
                    component: () => import( /* webpackChunkName: "form" */ '../components/page/CreateCourse.vue'),
                    meta: {
                        title: '新建课程'
                    }
                },
                {
                    path: '/studyCourse',
                    component: () => import( /* webpackChunkName: "form" */ '../components/page/StudyCourse.vue'),
                    meta: {
                        title: '课程学习'
                    }
                },
                {
                    path: '/courseManage',
                    component: () => import( /* webpackChunkName: "form" */ '../components/page/CourseManage.vue'),
                    meta: {
                        title: '课程管理'
                    }
                },
                {
                    path: '/createTraining',
                    component: () => import( /* webpackChunkName: "form" */ '../components/page/Create_training.vue'),
                    meta: {
                        title: '创建新项目'
                    }
                },
                {
                  path: '/complaint',
                  component: () => import( /* webpackChunkName: "form" */ '../components/page/complaint.vue'),
                  meta: {
                      title: '客户订单详情'
                  }
              },
              {
                path: '/find',
                component: () => import( /* webpackChunkName: "form" */ '../components/page/find.vue'),
                meta: {
                    title: '查询投诉'
                }
            },
            {
              path: '/car',
              component: () => import( /* webpackChunkName: "form" */ '../components/page/car.vue'),
              meta: {
                  title: '客户订单详情'
              }
          },

                {
                    path: '/404',
                    component: () => import( /* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: {
                        title: '404'
                    }
                },
                {
                    path: '/403',
                    component: () => import( /* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: {
                        title: '403'
                    }
                },

                {
                    path: '/prem',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/Prem.vue'),
                    meta: {
                        title: '权限测试'
                    }
                },
                {
                    path: '/role',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/Role.vue'),
                    meta: {
                        title: '角色测试'
                    }
                },
                {
                    path: '/Certificate',
                    component: () => import( /* webpackChunkName: "dashboard" */ '../components/page/Certificate.vue'),
                    meta: {
                        title: '上传证书'
                    }
                },

                {
                    path: '/userrole',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/UserRole.vue'),
                    meta: {
                        title: '人员设置'
                    }
                },
                {
                    path: '/recommend',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/recommend.vue'),
                    meta: {
                        title: '推荐课程'
                    }
                },
                {
                    path: '/studentAdministration',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/studentAdministration.vue'),
                    meta: {
                        title: '学员管理'
                    }
                },
                {
                    path: '/freight',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/freight.vue'),
                    meta: {
                        title: '货运单管理'
                    }
                }, {
                    path: '/freightVehicle',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/freightVehicle.vue'),
                    meta: {
                        title: '运输管理'
                    }
                },

                {
                    path: '/settle/WaybillSettle',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/settle/WaybillSettle.vue'),
                    meta: {
                        title: '货运单结算'
                    }
                },
                {
                    path: '/settle/WaybillSettleHistory',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/settle/WaybillSettleHistory.vue'),
                    meta: {
                        title: '货运单结算历史'
                    }
                },
                {
                    path: '/settle/CollectionSettle',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/settle/CollectionSettle.vue'),
                    meta: {
                        title: '代收结算'
                    }
                },
                {
                    path: '/settle/CollectionSettleHistory',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/settle/CollectionSettleHistory.vue'),
                    meta: {
                        title: '代收结算历史'
                    }
                },
                {
                    path: '/settle/DriverSettle',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/settle/DriverSettle.vue'),
                    meta: {
                        title: '司机结算'
                    }
                },
                // {
                //     path: '/settle/DriverSettleHistory',
                //     component: () => import( /* webpackChunkName: "prem" */ '../components/page/settle/DriverSettleHistory.vue'),
                //     meta: {
                //         title: '司机结算历史'
                //     }
                // },
                {
                    path: '/settle/BusinessChange',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/settle/BusinessChange.vue'),
                    meta: {
                        title: '业务变更'
                    }
                },
                // {
                //     path: '/settle/FinancialCost',
                //     component: () => import( /* webpackChunkName: "prem" */ '../components/page/settle/FinancialCost.vue'),
                //     meta: {
                //         title: '财务费用管理'
                //     }
                // },

                {
                    name: 'details',
                    path: '/details/:id',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/details.vue'),
                    meta: {
                        title: '学员管理'
                    }
                },
                {
                    path: '/exam',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/exam.vue'),
                    meta: {
                        title: '考试详情'
                    }
                },{
                    path: '/complaints-nquire',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/Complaints_nquire.vue'),
                    meta: {
                        title: '投诉查看'
                    }
                },
                {
                    path: '/complaints-add',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/Complaints_add.vue'),
                    meta: {
                        title: '投诉登记'
                    }
                },
                {
                    path: '/complaints-history',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/Complaints_history.vue'),
                    meta: {
                        title: '投诉历史'
                    }
                },{
                    path: '/DriverReceipt',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/DriverReceipt.vue'),
                    meta: {
                        title: '司机回执单管理'
                    }
                },
                {
                    path: '/FreightReceipt',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/FreightReceipt.vue'),
                    meta: {
                        title: '货物回执单管理'
                    }
                },
                {
                    path: '/UserReceipt',
                    component: () => import( /* webpackChunkName: "prem" */ '../components/page/UserReceipt.vue'),
                    meta: {
                        title: '客户回执单管理'
                    }
                }


            ]
        },
        {
            path: '/login',
            component: () => import( /* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: {
                title: '登录'
            }
        },
        {
            path: '/register',
            component: () => import( /* webpackChunkName: "login" */ '../components/page/register.vue'),
            meta: {
                title: '注册'
            }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});